<template>
  <div>
      <el-pagination
        :current-page="current"
        :page-size="size"
        :total="total"
        :page-sizes="[8,16,24,32]"
        layout="total, sizes, prev, pager, next, jumper"
        style="margin: -10px;"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange">
      </el-pagination>
  </div>
</template>
<script>
export default {
  data () {
    return {
      current: 1,
      size: 8
    }
  },
  props: ['total'],
  methods: {
    handleSizeChange (val) {
      this.size = val
      this.current = 1
      this.$emit('getApplyList', this.size, this.current)
    },
    handleCurrentChange (val) {
      this.current = val
      this.$emit('getApplyList', this.size, this.current)
    }
  }
}
</script>
